namespace Randomize.Core.Descriptors
{
    public abstract class RangeGenerationDesciptor<TGenerate, TDescriptor> : GenerationDescriptor<TGenerate, TDescriptor>, IRangeDescriptor<TGenerate, TDescriptor> 
        where TDescriptor : class, IGenerationDescriptor<TGenerate, TDescriptor>
        where TGenerate: struct 
    {
        protected TGenerate? Min { get; set; }

        protected TGenerate? Max { get; set; }

        public TDescriptor WithMin(TGenerate min)
        {
            this.Min = min;
            return this as TDescriptor;
        }

        public TDescriptor WithMax(TGenerate max)
        {
            this.Max = max;
            return this as TDescriptor;
        }
    }
}